package Test.Manager;

import static org.junit.Assert.*;

import java.sql.*;

import org.junit.*;

import customer.Login;

public class LoginTest {
	
Login l = new Login(); 
Connection conn = null;
Statement stmt = null;

	@Test
	public void testConnect_db() {
		//l = new Login();
		assertTrue(l.connect_db()==0);
		assertFalse(l.connect_db()==1);
	}


	@Test
	public void testCreate_tables() {
		//l = new Login();
		int r = l.create_tables();
		assertTrue (r == 1);
		assertFalse (r == 0);
	}


	@Test
	public void testCheck_ID() {
		//l = new Login();
		assertTrue(l.check_ID("admin")==true); 
		assertFalse(l.check_ID("admin")==false); 
	}

	@Test
	public void testCheck_pw() {
		//l = new Login();
		assertTrue(!l.check_pw("admin" , "error"));
	}

}
